class Dictclass():
  def __init__(self,class1):
    self.classs= class1
  def del_dict(self,key):
    if key in self.classs.keys():
      del self.classs[key]
      return self.classs
    return '没有该键,无须删除'
  def get_dict(self,key):
    if key in self.classs.keys():
      return self.classs[key]
    return 'Not Found'
  def get_key(self):
    return list(self.classs.keys())
  def update_dict(self,dict1):
    # self.classs.update(dict1)
    # 第二种方式
    a = dict(self.classs,**dict1)
    return a
a=Dictclass({"姓名":"李四","年龄":"20","性别":"女"})
print(a.del_dict("年龄1"))
print(a.get_dict("年龄1"))
print(a.get_key())
print(a.update_dict({"年薪":0}))

